<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>垂直对齐方式</title>
    <style>
        div{
            border: 1px solid #000;
        }
        img{
            vertical-align: middle;
        }
    </style>
</head>
<body>
    <div>
        <img src="../img/img01.jpg" alt="">
        文本内容
    </div>
</body>
</html>